// JavaScript Document

var data_changed = false;

$(function() {
	$('a[rel=external]').attr('target', '_blank');
	$('a[rel=email]').each(function() {
		$(this).html($(this).html().split('e.lx@').join(''));
		this.href = 'mailto:'+ $(this).attr('href').split('e.lx@').join('');
	});

	if (typeof(page_images) == 'undefined') {
		$('#menu_navigation li a').each(function(i) {
			if ($(this).attr('rel').length == 0) {
				$(this).attr('rel', $(this).attr('href'));
				$(this).attr('href', 'javascript: void(0);');
				$(this).click(function() {
					$('#page_content').width(500).fadeOut(1000);
					$('#image').fadeOut(800);
					setTimeout('window.location.href = \''+ $(this).attr('rel') +'\';',1000);
				});
			}
		});

		$('#image img')[0].onload = function() {
			$('#image img').fadeIn(4000);
		}
	}
	
	
	$("#revelado").mouseover(function(){
		$(this).attr("src","imgs/revelado2.png");
    }).mouseout(function(){
    	$(this).attr("src","imgs/revelado1.png");
    });

	$("#album").mouseover(function(){
		$(this).attr("src","imgs/album2.png");
    }).mouseout(function(){
    	$(this).attr("src","imgs/album1.png");
    });
});
